#include <iostream>

using namespace std;

template <typename T>
int recBinsearch(const T in[],const int left,const int right,const T target){
    if (left<=right){
        int mid=(left+right)/2;
        if(in[mid]==target){
            return mid;
        } else if(in[mid]>target){
            return recBinsearch(in,left,mid,target);
        } else{
            return recBinsearch(in,mid+1,right,target);
        }
    }
    return -1;
}

int main(){
    const int len=10;
    const int target=6;
    int a[len]={0,1,2,3,4,5,6,7,8,9};
    int idx=recBinsearch(a,0,9,target);
    if(idx>0){
        cout<<"find "<<idx<<endl;
    } else{
        cout<<"not find"<<endl;
    }
    return 0;
}